import Vue from 'vue'
import App from './App'
import store from './store'
import utils from "common/util.js"
import JSEncrypt from 'static/ccjp-SlideVerification/jsencrypt.js'

Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.utils = utils

//带时间戳的rsa加密
Vue.prototype.$resJm = function(x) {
    var e=new JSEncrypt();
    //这里配置你的私钥,此仅为测试用
    e.setPublicKey("MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCy9dLbrtE2yPJ2nxoeYuZZczWNCOxijYKpttdS9cVsqb4xeycXbfeAfIghLcfxW/fUB/we/oyHwdUSc9E+s2oFA5Ed5F2fEUbZ23jzUsfYvqbYHzHbn2m1eGaAIOLgVow/DqRubZzv2/Qz4mNNRrkO+jJVCf9oTwmtmC5/ZEBNCQIDAQAB");
    return(encodeURIComponent(e.encrypt(x+"&"+new Date().getTime())))
};

App.mpType = 'app'

// 把 store 对象提供给 “store” 选项，这可以把 store 的实例注入所有的子组件
const app = new Vue({
	store,
    ...App
})
app.$mount()
